
LIBNAME=myfile
APPNAME=main
LIBPATH=`pwd`/./lib

#头文件搜索路径
CFLAGS+=-I${LIBPATH}
#库文件搜索路径
LDFLAGS+=-L${LIBPATH} -L../client/lib/lib
LIBS=-l${LIBNAME} -l:libsqlite3.so.0

CC=gcc

all:
	@echo "Start compile library"
	make -C src
	@echo "Start compile test program..."
	${CC} ${CFLAGS} main.c -o ${APPNAME} ${LDFLAGS} ${LIBS}

clean:
	rm -f *.o
	rm -f ${APPNAME}

run:
	@echo "Start run test program..."
	export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LIBPATH} && ./${APPNAME} -p 12315

